import pt.webdetails.cda.*

cda = new CdaQueryComponent()

//
// Execute CDA query
//

//setup inputs
cdaHarness = new ActionHarness(cda)
cdaHarness.setValues([file:'bi-developers/cda/cdafiles/sql-jndi.cda', dataAccessId:1])

//execute               
cda.execute()

//
// Process resultset
//

printStream.println "*** Resultset from CDA file ${cda.file} ***"
def res = cda.getResultSet()

rowCount = res.getRowCount()

printStream.println "row count: ${rowCount}"

for ( i in 1..rowCount ) {
  rowStr = ""
  res.next().each { col ->
    rowStr += "${col}\t"
  }
  printStream.println rowStr
}





